#pragma once

#include "Containers/Map.h"
#include "Framework/ApplicationSubsystem.h"
#include "MouseCursor.h"
#include "MouseCursorManager.m.h"

//manager of mouse cursor
RCLASS()
class WHENGINE_API RMouseCursorManager :public RApplicationSubsystem
{
    ROBJECT
public:   
    RMouseCursorManager();

    static RMouseCursorManager* Get();

    virtual void Initialize() override;

    void UseCursor(RMouseCursorPtr InCursor);

    void UseCursor(EMouseCursorType InType);

    void UseDefaultCursor();
private:
    
    RMouseCursorWeakPtr CurrentCursor;

    TMap<EMouseCursorType /*System Cursor Type*/,RMouseCursorPtr> SystemCursors; 

    void CreateSystemCursor(EMouseCursorType InType);
};